package com.matrix.java.chap_03.exercise;

import org.junit.Test;

/**
 * @since 2021-10-20-15:13
 */
public class EX3_5 {

    @Test
    public void test3_8() {
        int x = 2,
                y = 2,
                z = 0;
        if (x > 2) {
            if (y > 2) {
                z = x + y;
                System.out.println("z is " + z);
            }
        } else {
            System.out.println("x is " + x);
        }
    }

    @Test
    public void test3_9() {
        int x = 2,
                y = 3,
                z = 0;
        if (x > 2) {
            if (y > 2) {
                z = x + y;
                System.out.println("z is " + z);
            }
        } else {
            System.out.println("x is " + x);
        }
    }

    @Test
    public void test3_10() {
        double score = 80;
        if (score >= 60.0) {
            System.out.println("D");
        } else if (score >= 70.0) {
            System.out.println("C");
        } else if (score >= 80.0) {
            System.out.println("B");
        } else if (score >= 90.0) {
            System.out.println("A");
        } else {
            System.out.println("F");
        }
    }
}
